package com.summer.dingding.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.summer.user.model.User;
@Entity
@Table(name = "dingding_user")
public class DingDingUser implements Serializable{

	public static final long serialVersionUID = 1l;
	private String id;
	/** 员工唯一标识ID（不可修改）*/
	private String userid;
	/**是否已经激活，true表示已激活，false表示未激活*/
	private String active;
	/**头像url*/
	private String avatar;
	/**成员所属部门id列表*/
	private String department;
	private String errcode;
	private Boolean errmsg;
	/**是否为企业的管理员，true表示是，false表示不是*/
	private String isAdmin;
	/**是否为企业的老板，true表示是，false表示不是*/
	private String isBoss;
	/**是否号码隐藏，true表示隐藏，false表示不隐藏*/
	private String isHide;
	/**在对应的部门中是否为主管：Map结构的json字符串，key是部门的Id，value是人员在这个部门中是否为主管，true表示是，false表示不是*/
	private String isLeaderInDepts;
	/**是否是高管*/
	private String isSenior;
	/**员工工号*/
	private String jobnumber;
	/** 成员名称 */
	private String name;
	private String orderInDepts;
	/**职位信息*/
	private String position;
	/**在当前isv全局范围内唯一标识一个用户的身份,用户无法修改*/
	private String unionid;
	/**入职时间。Unix时间戳 （在OA后台通讯录中的员工基础信息中维护过入职时间才会返回)*/
	private String hiredDate;
	/**手机号码区号*/
	private String stateCode;
	/**绑定状态*/
	private String bindStatus;
	
	private User user;
	
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 100)
	public String getId() {
		return id;
	}

	@Column(name = "USERID")
	public String getUserid() {
		return userid;
	}

	@Column(name = "ACTIVE")
	public String getActive() {
		return active;
	}

	@Column(name = "AVATAR")
	public String getAvatar() {
		return avatar;
	}

	@Column(name = "DEPARTMENT")
	public String getDepartment() {
		return department;
	}

	@Column(name = "ISADMIN")
	public String getIsAdmin() {
		return isAdmin;
	}

	@Column(name = "ISBOSS")
	public String getIsBoss() {
		return isBoss;
	}

	@Column(name = "ISHIDE")
	public String getIsHide() {
		return isHide;
	}

	@Column(name = "ISLEADERINDEPTS")
	public String getIsLeaderInDepts() {
		return isLeaderInDepts;
	}

	@Column(name = "ISSENIOR")
	public String getIsSenior() {
		return isSenior;
	}

	@Column(name = "JOB_NUMBER")
	public String getJobnumber() {
		return jobnumber;
	}

	@Column(name = "NAME")
	public String getName() {
		return name;
	}

	@Column(name = "ORDER_IN_DEPTS")
	public String getOrderInDepts() {
		return orderInDepts;
	}

	@Column(name = "POSITION")
	public String getPosition() {
		return position;
	}

	@Column(name = "UNIONID")
	public String getUnionid() {
		return unionid;
	}

	@Column(name = "HIRED_DATE")
	public String getHiredDate() {
		return hiredDate;
	}

	@Column(name = "STATE_CODE")
	public String getStateCode() {
		return stateCode;
	}
	
	@Column(name = "BIND_STATUS")
	public String getBindStatus() {
		return bindStatus;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public void setActive(String active) {
		this.active = active;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public void setDepartment(String department) {
		this.department = department;
	}
	
	public void setIsAdmin(String isAdmin) {
		this.isAdmin = isAdmin;
	}

	public void setIsBoss(String isBoss) {
		this.isBoss = isBoss;
	}

	public void setIsHide(String isHide) {
		this.isHide = isHide;
	}

	public void setIsLeaderInDepts(String isLeaderInDepts) {
		this.isLeaderInDepts = isLeaderInDepts;
	}

	public void setIsSenior(String isSenior) {
		this.isSenior = isSenior;
	}

	public void setJobnumber(String jobnumber) {
		this.jobnumber = jobnumber;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setOrderInDepts(String orderInDepts) {
		this.orderInDepts = orderInDepts;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}

	public void setHiredDate(String hiredDate) {
		this.hiredDate = hiredDate;
	}

	public void setStateCode(String stateCode) {
		this.stateCode = stateCode;
	}
	
	public void setBindStatus(String bindStatus) {
		this.bindStatus = bindStatus;
	}

	@OneToOne
	@JoinColumn(name = "chifan_id", nullable = false)
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
